import { createStore } from 'vuex'

export default createStore({
  state: {
    login: false,
    user: null,
    roleShow: false,      // 地区角色点击
    roleL: [],            // 地区角色信息
    screenWidth: document.documentElement.clientWidth,  //屏幕宽度
    screenHeight: document.documentElement.clientHeight,  //屏幕高度
  },
  mutations: {
    ISLOGIN(state, user) {
      state.login = true;
      state.user = user;
    },
    roleDisplay(state) {
      state.roleShow = !state.roleShow;
    },
    setRoleL(state, role) {
      state.roleL = role;
    }
  },
  actions: {
  },
  modules: {
  }
})
